class Solution(object):
    def getSum(self, a, b):
        """
        :type a: int
        :type b: int
        :rtype: int
        """
        if a == -b:
            return 0
        while a != 0:
            t = a
            a = (a & b) << 1
            b = t ^ b

        return b

s = Solution()
print(s.getSum(-14, 16))
print(s.getSum(-1, 1))
print(s.getSum(1, 2))
